﻿
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;

namespace ZR.Model.Dto.Business.ProductionControl
{
    /// <summary>
    /// 工艺明细表查询对象
    /// </summary>
    public class CksTechniqueDetailsQueryDto : PagerInfo
    {
        /// <summary>
        /// 工艺ID
        /// </summary>
        public int TechniqueId { get; set; }
    }

    public class CksTechniqueDetailsBatchUpdateDto
    {
        [ValidateNever]
        public List<CksTechniqueDetailsDto> Items { get; set; }
    }

    /// <summary>
    /// 工艺明细表输入输出对象
    /// </summary>
    public class CksTechniqueDetailsDto
    {
        [Required(ErrorMessage = "主键不能为空")]
        public int Id { get; set; }

        [Required(ErrorMessage = "工艺表Id不能为空")]
        public int TechniqueId { get; set; }

        [Required(ErrorMessage = "信号名称不能为空")]
        public string Name { get; set; }
        /// <summary>
        /// 数据项关联的模板Id
        /// </summary>
        public int ItemTemplateId { get; set; }

        public int Sequence { get; set; }


        [Required(ErrorMessage = "设定值不能为空")]
        public string ConfigValue { get; set; }

        public int DataId { get; set; }

        public bool IsPrimary { get; set; }
        public string RunValue { get; set; } = string.Empty;

        [ExcelColumn(Name = "信号类型(1上传信号 2确认信号 3工艺参数)")]
        public string TypeLabel { get; set; }
    }

    public class AddCksTechniqueLogDto
    {
        /// <summary>
        /// 工艺ID
        /// </summary>
        public int TechId { get; set; }
    }
}